API SPEND COMPASS — 1 LESSON
Version 1.1.0 · About 20 minutes

YOUR FINISHED RESULT
One named, dated estimate of one call and a chosen number of identical calls,
with a public pricing-page source, three separate token categories, the main
assumptions and at least one excluded charge that could change the bill.

1. NAME A SMALL EXPERIMENT — 3 minutes
Choose a bounded test: for example, draft 20 short messages from a fixed brief.
Use a name you can recognize later. Decide whether this is a one-call estimate
or a repeat-run forecast. This lesson prices a scenario; it does not run it.

2. CHECK THE RATE BASIS — 4 minutes
Use the provider's own pricing page for your exact model, tier and usage mode.
Write down its public URL and the date you checked it. If your negotiated rate
does not appear there, record that separately in your private worksheet and
do not treat the public rate as your contracted price.

This calculator accepts USD per one million tokens. If the source uses another
unit, convert it before entering a rate. Examples of arithmetic only:
  USD per 1,000 tokens × 1,000 = USD per one million tokens.
  USD per token × 1,000,000 = USD per one million tokens.
Do not assume rates in another currency are USD. Currency conversion is a
separate assumption, not a service provided by this calculator.

Enter a rate for every category, including zero-token categories. A blank rate
means unknown; it does not mean free. Enter zero only when you have confirmed
that category is free under the applicable rate terms.

The tool checks the source URL's format and date. It does not visit that page,
verify its authority, fetch rates or decide whether you qualify for a discount.

3. KEEP INPUT CATEGORIES SEPARATE — 4 minutes
Use counts from a small observed run or a clearly labeled estimate. A provider
may report TOTAL input and a cached subset. In that case:
  uncached input = total input − cached input
  total input = uncached input + cached input

Example: 20,000 total input tokens, including 8,000 cached, becomes 12,000
uncached plus 8,000 cached. Entering 20,000 as uncached and also entering 8,000
as cached would count 8,000 input tokens twice.

Count output once. Check the provider's definitions for reasoning tokens;
an output total may already include them. This calculator has only uncached
input, cached input and output. It does not separately model reasoning charges,
cache writes, image/audio units, tools or other billing categories. If your
model requires those, note the missing charges and keep this result partial.

Do not assume a repeated prompt qualifies for cached rates. Eligibility and
the cache's actual behavior belong to the provider's terms and usage evidence.

4. CALCULATE AND TEST A REPEAT SCENARIO — 4 minutes
For entered counts U, C and O, and per-million rates Ru, Rc and Ro:

  one-call estimate = (U × Ru + C × Rc + O × Ro) ÷ 1,000,000
  repeat-run estimate = one-call estimate × number of identical calls

The browser calculator uses integer decimal arithmetic for the supported
entries rather than rounding each category to cents. A valid zero produces
zero token cost at those inputs. It does not establish that the provider's
whole service is free.

Repeat count assumes every call has the same counts and rates. If retries,
longer conversations or different tasks change them, save separate named
scenarios. The worksheet keeps scenarios separate rather than automatically
adding them into a combined budget.

Optionally enter the budget AVAILABLE to this experiment. The displayed
remaining amount and number of affordable identical calls are forecasts.
The calculator cannot reserve funds, stop your program, enforce a provider's
billing settings or include money you have already spent elsewhere.

5. SAVE AN HONEST RECEIPT — 5 minutes
Save your scenario to the worksheet and download the CSV before reloading.
Record which counts were measured and which were estimated in WORKSHEET.txt.
Add at least one limitation relevant to your use. Examples:
  tool requests have a separate fee;
  actual output length may vary;
  one failed attempt may still be charged;
  the cache rate is not yet supported by usage evidence;
  taxes, a subscription or currency conversion apply separately.

Use the fictional example to check that you understand the formula. Complete
EXAMPLE-AND-SELF-CHECK.txt. A good next step is a deliberately small test whose
reported usage you can compare with this estimate, using your own provider
account and its own spending controls. That test is outside this package.

SUPPORTED CALCULATOR BOUNDS
Whole token counts: 0 through 1,000,000,000,000 per category per call.
Identical calls: 1 through 1,000,000.
Rates: 0 through 1,000,000 USD per million tokens, up to 6 decimal places.
Available budget: up to 1,000,000,000,000 USD, up to 6 decimal places.
Plain numbers only: no currency signs, commas, signs or exponent notation.
25 saved scenarios per tab, with distinct names.

These are technical input bounds, not recommended budgets or typical prices.
